package com.xc.freeapp.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xc.freeapp.dao.AppVersionMapper;
import com.xc.freeapp.dao.dataSource.DBContextHolder;
import com.xc.freeapp.entity.AppImage;
import com.xc.freeapp.entity.AppVersion;
import com.xc.freeapp.service.AppVersionService;
@Service
public class AppVersionServiceImpl implements AppVersionService {
	@Autowired
	AppVersionMapper 	appVersionMapper;
	public List<AppVersion> getAppVersionByBusinessid(Integer businessId){
		DBContextHolder.switchDataSourceRW();//切换数据源
		return appVersionMapper.selectByBusinessid(businessId);
	}
	public AppVersion getAppVersionByVersionNO(String appid,String versionNo){
		DBContextHolder.switchDataSourceRW();//切换数据源
		return appVersionMapper.selectByVersionNo(appid,versionNo);
	}

}
